<template>
  <div>
    <van-nav-bar
      :title="title || '初始化'"
      :left-text="leftText"
      :left-arrow="leftArrow"
      @click-left="onClickLeft"
      @click-right="onClickRight"
    >
      <template #right>
        <slot name="right">
          <!-- <van-icon name="search" size="18" /> -->
        </slot>
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  methods: {
    // onClickLeft() {
    //   Toast("返回");
    // },
    // onClickRight() {
    //   Toast("按钮");
    // },
  },
  props: {
    leftText: {
      type: String,
      default: "",
    },
    leftArrow: {
      type: Boolean,
      default: false,
    },
    title: {
      type: String,
      default: "标题",
    },
    onClickLeft: {
      type: Function,
      default: function () {},
    },
    onClickRight: {
      type: Function,
      default: function () {},
    },
  },
};
</script>

<style></style>
